package wechat.bean.response.message.receive;

import org.dom4j.DocumentException;

import wechat.bean.response.MessageBaseBean;

/**
 * 链接消息
 * 
 *
 */
public class ReceiveLinkBean extends MessageBaseBean {
	private String Title;
	private String Description;
	private String Url;
	
	public ReceiveLinkBean(String str) throws DocumentException {
		super(str);
		super.setMsgType(Receive_Message_Link);
	}
	
	public ReceiveLinkBean(){
		super.setMsgType(Receive_Message_Link);
	}

	public String getTitle() {
		return Title;
	}

	public void setTitle(String title) {
		Title = title;
	}

	public String getDescription() {
		return Description;
	}

	public void setDescription(String description) {
		Description = description;
	}

	public String getUrl() {
		return Url;
	}

	public void setUrl(String url) {
		Url = url;
	}


	
	protected static final String Xpath_Title = "/xml/Title";
	protected static final String Xpath_Description = "/xml/Description";
	protected static final String Xpath_Url = "/xml/Url";
	
	public void transform() throws Exception {
		super.transform();
		this.setTitle(getNodeText(Xpath_Title));
		this.setDescription(getNodeText(Xpath_Description));
		this.setUrl(getNodeText(Xpath_Url));
	}
	
	
//	public String buildXml() throws Exception {
//		super.buildXml();
//		super.addNode("Title", getTitle());
//		super.addNode("Description", getDescription());
//		super.addNode("Url", getUrl());
//		return parent.asXML();
//	}

	




}
